POV-Ray : Newsgroups : povray.advanced-users : pov runtime interface with external software : Re: pov runtime interface with external software Server Time
5 Jul 2024 16:22:57 EDT (-0400)
  Re: pov runtime interface with external software  
From: Alain
Date: 8 May 2008 20:12:51
Message: <48239703$1@news.povray.org>
ibhd nous illumina en ce 2008-05-07 10:02 -->
> Hello,
> 
> I am evaluating whether it would be possible to simulate the trajectory of a
> Braitenberg vehicle with POV. A BraitBot (type 2) is essentially a vehicle with
> two light sensors each connected to one of two motors. The speed of motor
> rotation is wholly dependent on the light intensity received by the sensor. We
> have a working prototype here where the light sensors are being replaced with a
> 360 degree camera.
> 
> What I need is to be able to model a robot with the camera on it in POV and move
> the 'bot through a POV scene. Where the 'bot goes is a function of the light
> values received by the camera.
> 
> I therefore need routines for the transformation camera-picture -> new
> coordinates. My query is the following. The camera picture is 360 degrees which
> will be split into 8 regions -> I need to be able to capture the camera output
> into a programming structure, such as an array, analyse it and return a new
> coordinate.
> 
> The obvious way of doing it would be to make a raytrace, store the picture in a
> file get a linux task to analyse that file and then return the coordinates and
> set pov up for another raytrace. Is there any way of capturing the camera input
> and linking external routines more elegantly?
> 
> Thanks
> 
> Hans
> 
> 
> 
It may be possible to do everything inside POV-Ray. By using the trace function 
and eval_pigment you could get the "light" intensity in various directions. you 
calculate the direction to move in the next frame and save to a file. You render 
the frame. On the next frame, you read back the location and direction saved by 
the previous frame, and you repeat the process.
You may need to make 100 traces for this to work.
It works best if the lights are broad, like surfaces with a high ambient. It 
can't work with point_light unless they are close to a surface.
In the same scene, you can have several such robots, some of whitch carying some 
light, or been bright themself.

Alain


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.